$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
require 'test/unit'
require 'engine'
require 'testcasedoc'

module LWA
  class EngineTest < Test::Unit::TestCase
    $engine = Engine.new
    $engine.close_browser_when_finished = true

    def test_01_process_single_step
      $engine.process_single_step(TestCaseDoc.new("sample_testcase.xml").get_case(3).step_list[0])
    end

    def test_02_process_testcase_with_snippet
      $engine.process_testcase(TestCaseDoc.new("sample_testcase.xml").get_case(4))
    end

    def test_03_process_testcase_with_valueset
      $engine.process_testcase(TestCaseDoc.new("sample_testcase.xml").get_case(6))
    end

    def test_04_process_multiple_instance_of_browser
      $engine.process_testcase(TestCaseDoc.new("sample_testcase.xml").get_case(9))
    end
  end
end